package com.lesso.yzh.sunflower.model;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("base_device")
public class Device extends BaseModel<Device>{
    private static final long serialVersionUID = 1L;

    /**
     * 设备id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 设备号
     */
    @TableField("device_code")
    private String deviceCode;

    /**
     * 设备名称
     */
    @TableField("device_name")
    private String deviceName;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
